#ifndef QCELLEDITDIALOG_H
#define QCELLEDITDIALOG_H

#include <QGridLayout>
#include <QHeaderView>
#include <QDialog>
#include <QPushButton>
#include <QStringList>
#include <QTreeWidget>
#include <QTreeWidgetItem>

#include <QDebug>

#include "cell.h"
#include "qmaincore.h"

//! Model edition dialog window.
/*!
  QCellEditDialog allows user to add and remove elements from the model.
  It also allows to change model parameters.
  Consisits of tree widget and button block.
  Button block allows to delete elements and accept model.
  Tree widget represents model elements and parameters as a tree.
  */
class QCellEditDialog : public QDialog
{
    Q_OBJECT

private:
    CELL cell;
    QMainCore *core;

    QGridLayout *mainLayout;

    QPushButton *acceptButton;
    QPushButton *deleteButton;
    QPushButton *closeButton;

    QTreeWidget *treeWidget;


protected:
    void createButtons(int row);
    void addCell(void);
    void addNodes(void);
    void addEdges(void);
    void addAreas(void);

public:
    explicit QCellEditDialog(QMainCore *_core, QWidget *parent = 0);

signals:

protected slots:
    void on_acceptButton_clicked(void);
    void on_deleteButton_clicked(void);
    void on_closeButton_clicked(void);

public slots:

};

#endif // QCELLEDITDIALOG_H
